package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_SYS_ACL"
 *     
*/
public class CcpSysAcl implements Serializable {

    /** identifier field */
    private String aclGuid;

    /** persistent field */
    private String aclUser;

    /** persistent field */
    private String aclResource;

    /** nullable persistent field */
    private String aclAcl;

    /** full constructor */
    public CcpSysAcl(String aclGuid, String aclUser, String aclResource, String aclAcl) {
        this.aclGuid = aclGuid;
        this.aclUser = aclUser;
        this.aclResource = aclResource;
        this.aclAcl = aclAcl;
    }

    /** default constructor */
    public CcpSysAcl() {
    }

    /** minimal constructor */
    public CcpSysAcl(String aclGuid, String aclUser, String aclResource) {
        this.aclGuid = aclGuid;
        this.aclUser = aclUser;
        this.aclResource = aclResource;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="ACL_GUID"
     *         
     */
    public String getAclGuid() {
        return this.aclGuid;
    }

    public void setAclGuid(String aclGuid) {
        this.aclGuid = aclGuid;
    }

    /** 
     *            @hibernate.property
     *             column="ACL_USER"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getAclUser() {
        return this.aclUser;
    }

    public void setAclUser(String aclUser) {
        this.aclUser = aclUser;
    }

    /** 
     *            @hibernate.property
     *             column="ACL_RESOURCE"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getAclResource() {
        return this.aclResource;
    }

    public void setAclResource(String aclResource) {
        this.aclResource = aclResource;
    }

    /** 
     *            @hibernate.property
     *             column="ACL_ACL"
     *             length="10"
     *         
     */
    public String getAclAcl() {
        return this.aclAcl;
    }

    public void setAclAcl(String aclAcl) {
        this.aclAcl = aclAcl;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("aclGuid", getAclGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpSysAcl) ) return false;
        CcpSysAcl castOther = (CcpSysAcl) other;
        return new EqualsBuilder()
            .append(this.getAclGuid(), castOther.getAclGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getAclGuid())
            .toHashCode();
    }

}
